package com.segersten.othello.service.akka.lobby;

import java.util.Date;

import javax.xml.bind.annotation.XmlRootElement;

import com.segersten.othello.service.akka.Player;

@XmlRootElement
public class PlayerScore {

	private int score;
	private long updated;
	
	public PlayerScore() {
		this.updated = new Date().getTime();
	}

	public int getScore() {
		return score;
	}

	public void setScore(int score) {
		this.score = score;
	}

	public long getUpdated() {
		return updated;
	}

	public void setUpdated(long updated) {
		this.updated = updated;
	}

	
	@Override
    public String toString()
    {
        return "PlayerScore [score=" + score + ", updated=" + updated + "]";
    }

    public void increase(int score) {
		this.score+=score;
		this.updated = new Date().getTime();
	}

	
}
